@use "bulma/sass/utilities/css-variables" as cv;
@use "bulma/sass/utilities/initial-variables" as iv;
@use "bulma/sass/utilities/derived-variables" as dv;
@use "bulma/sass/utilities/mixins" as mixins;

// .#{iv.$class-prefix}upload {
//     @include cv.register-vars((
//         ""
//     ))
// };


.#{iv.$class-prefix}upload {
    position: relative;
    display: inline-flex;
    input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        outline: none;
        cursor: pointer;
        z-index: -1;
    }
    .upload-draggable {
        cursor: pointer;
        padding: 0.25em;
        border: 1px dashed cv.getVar("grey-light");
        border-radius: cv.getVar("radius-large");
        &.is-disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        &.is-loading {
            position: relative;
            pointer-events: none;
            opacity: 0.5;
            &:after {
                @include mixins.loader;
                top: 0;
                left: calc(50% - 1.5em);
                width: 3em;
                height: 3em;
                border-width: 0.25em;
            }
        }
        &.is-expanded {
            width: 100%;
        }
    }
    &.is-expanded {
        width: 100%;
    }
    &.is-rounded {
        border-radius: cv.getVar("radius-rounded");

        .file-name {
            border-top-right-radius: cv.getVar("radius-rounded");
            border-bottom-right-radius: cv.getVar("radius-rounded");
        }
    }
}
